#include <myheader_c_plus.h>
using std::endl;
using std::cout;
class Base{
public:
    virtual void print(){
        cout << "print()" << endl;
    };

    virtual void display(){
        cout << "display()" << endl;
    }

    virtual void show(){
        cout << "show()" << endl;
    }
private:
    long _base = 10;
};


class Drived : public Base{
public:
    void print() override{
        cout << "Drived::print()" << endl;
    }

    void display() override{
        cout << "Drived::display" << endl;
    }
private:
    long _drived = 100;

};
int main(int argc, char *argv[])
{
    Base base;
    Drived drived;
    cout << sizeof(base) << " " << sizeof(drived) << endl;
    long *pbase = (long *)&base;//指向虚函数表
    long *pdrived = (long *)&drived;


    return 0;
}

